package UI.bll;

import javax.swing.*;
import java.awt.*;

public class uiutlLogin {

    public uiutlLogin() {
    }

    public  void setFrameTmage(JFrame jFrame,String path){

        //获取工具类对象
        Toolkit defaultToolkit = Toolkit.getDefaultToolkit();

        Image image = defaultToolkit.getImage(path);

        jFrame.setIconImage(image);

    }

    public  void setFrameConter(JFrame jFrame){

        Toolkit defaultToolkit = Toolkit.getDefaultToolkit();

        Dimension screenSize = defaultToolkit.getScreenSize();
        double width = screenSize.getWidth();
        double height = screenSize.getHeight();

        int width1 = jFrame.getWidth();
        int height1 = jFrame.getHeight();

        int v = (int)(width - width1) / 2;
        int v1 = (int)(height - height1) / 2;

        jFrame.setLocation(v, v1);
    }
}
